package cn.aitstone.system.domain;

import cn.aitstone.basic.domain.BaseDomain;
import cn.aitstone.org.domain.Department;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author Sheldon
 * @since 2022-07-11
 */
@Data
public class Menu extends BaseDomain {

    private String name;
    private String component;
    private String url;
    private String icon;
    private Integer index;
    private Long parentId;
    private String intro;

    private Boolean state;
    // 父级菜单
    private Menu parent;

    // 封装子部门集合字段
    @JsonInclude(JsonInclude.Include.NON_EMPTY) // 当数据不为空的时候才返回
    private List<Menu> children = new ArrayList<>();


}
